package com.weixin.program;

import com.weixin.program.task.ConsumerTask;
import com.weixin.program.task.NoticeTask;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

@SpringBootApplication
@Slf4j
@EnableScheduling
@ServletComponentScan(basePackages = "com.weixin.program.servlet")
public class ProgramApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(ProgramApplication.class, args);
        new ConsumerTask().start();
        new NoticeTask().start();
        log.info("微信程序启动成功......");
    }
}
